Sociology 229: Advanced Regression
Assignment #4: EHA Models
Due: Start of class, February 16
This assignment requires a dataset on the course website entitled “Assignment 4 Environment.dta” and an accompanying do-file.
Regarding the data: The unit of analysis is the nation-state. The outcome of interest is first enactment of major pro-environmental legislation. Let’s focus only on non-Western countries by using the command “keep if west==0”.
1. Download the dataset in STATA
2. Create your own “do” file that opens the data
3. My syntax makes a hazard plot and runs some hazard models. See if you can get that same syntax to run on your computer without error. Make your own do-file, don’t just use mine!
4. Create a dummy variable that distinguishes very poor countries (defined as gdp < 7.8). Plot the hazard for each group using the “by” option… such as “sts graph, haz by(verypoor)”
5. What is the effect of a 1-point increase in democracy, based on the Cox model?
6. Run a piecewise model, breaking the analysis into two or three time slices. The easiest way to do this is to simply specify the times in the stcox or streg command… such as: stcox var1 var2 var3 if year < 1985. More complex specifications are also possible… such as: year >= 1985 & year < 1995.
7. Variables that have very different effects over time suggest non-proportionality. Based on the results of the piecewise model, identify a variable that seems to be non-proportional. Construct a time-interaction variable that might help correct the non-proportionality. For instance, if you find that education has a larger effect in a particular time period, construct an interaction term interacting the variable with dummy variable for that time period (which you must create). Finally, estimate a Cox model for the entire period, and include your time dummy and interaction. That’s one easy way to address non-proportionality.
Questions:
1. Interpret the output of a basic exponential (constant rate) hazard model:
a. What is the effect of a 1-point increase in degradation on the hazard rate of enactment?
b. What is the effect of a 1-point increase in democracy?
c. What is the (approximate) range of the democracy variable in the data? (It is OK to round off the difference in democracy to an integer.) What is the difference in hazard rate between the least-democratic and most-democratic cases?
2. Comment on your hazard plots, broken out by low and high GDP. Do the hazards seem proportional?
3. Comment on the differences in results between your constant rate model and the Cox model.
4. Which model do you think is most appropriate: the Cox model or the constant-rate model? Why?
Turn in the following:
1. The output from your Cox model (step 3)
2. Your hazard plot (broken out by the dummy variable you created)
3. Answers to the questions